import request from '@/utils/request'

export const userApi = {
  // 用户登录
  login(data) {
    return request({
      url: '/user/user/login',
      method: 'post',
      data
    })
  },

  // 获取用户详细信息
  getUserDetail(userId) {
    return request({
      url: `/user/user/getUserInfo/${userId}`,
      method: 'get'
    })
  },

  // 添加注册方法
  register(data) {
    return request({
      url: '/user/user/register',
      method: 'post',
      data
    })
  }
}
